//
//  KDHttpRequest.h
//  KDTools
//
//  Created by 斌 on 15/11/19.
//  Copyright © 2015年 斌. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface KDHttpRequest : NSObject

/**
 *  设置参数
 *
 *  @param urlString 请求地址
 *  @param HTTPMethod 请求方式
 *  @param successBlock 成功返回
 *  @param failedBlock 失败返回
 *
 */
+ (void)sendRequestWithURLString:(NSString *)urlString
                      httpMethod:(NSString *)HTTPMethod
                    successBlock:(void (^)(NSString *retData))successBlock
                     failedBlock:(void (^)(NSString *errMsg))failedBlock;

/**
 *  设置参数
 *
 *  @param urlString 请求地址
 *  @param dict 上送参数
 *  @param timeoutInterval 超时时间/S
 *  @param HTTPMethod 请求方式
 *  @param successBlock 成功返回
 *  @param failedBlock 失败返回
 *
 */
+ (void)sendRequestWithURLString:(NSString *)urlString
                     andDataDict:(NSDictionary *)dict
                 timeoutInterval:(NSTimeInterval)timeoutInterval
                      httpMethod:(NSString *)HTTPMethod
                    successBlock:(void (^)(NSString *retData))successBlock
                     failedBlock:(void (^)(NSString *errMsg))failedBlock;


@end
